< previous page
page_210
next page >
Page 210
lngRet = CLng("40560")
Me.Cls
Me.Print lngRet
End Sub
CSng( )
CSng()
converts any numeric or string expression into a single value. Heres an example:
Private Sub cmdCSng_Click ()
Dim sngValue As Single
Dim dblValue As Double
dblValue = 554.5594
sngValue = CSng(dblValue)
Me.Cls
Me.Print "dblValue = 554.5594"
Me.Print "sngValue = CSng(dDbouble) " & sngValue
End Sub
CStr( )
CStr()
converts any numeric or string expression into a string value. Heres an example:
Private Sub cmdCStr_Click ()
Dim strInteger As String
Dim intValue As Integer
intValue = 1000
strInteger = CStr(intValue)
Me.Cls
Me.Print "intValue = 1000"
Me.Print "strInteger = CStr(intValue) " & strInteger
End Sub
< previous page
page_210
next page >
If you like this book, buy it!